home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3s / widec.z / widec
Encoding:
Text File  |  2002-10-03  |  8.1 KB  |  139 lines

  1.  
  2.  
  3.  
  4. wwwwiiiiddddeeeecccc((((3333SSSS))))                                                            wwwwiiiiddddeeeecccc((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _wwww_iiii_dddd_eeee_cccc  - multibyte character I/O routines
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_wwww_iiii_dddd_eeee_cccc_...._hhhh_>>>>
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ((((IIIInnnntttteeeerrrrnnnnaaaattttiiiioooonnnnaaaallll FFFFuuuunnnnccccttttiiiioooonnnnssss))))
  16.      The functions that the multibyte character library provides for _wwww_cccc_hhhh_aaaa_rrrr______tttt
  17.      string operations correspond to those provided by _ssss_tttt_dddd_iiii_oooo(3S) as shown in
  18.      the table below:
  19.  
  20.  
  21.           _____________________________________________________________
  22.                           character-based
  23.                           function
  24.                                             byte-based
  25.                                             function
  26.                                                          character- and
  27.                                                          byte-based
  28.  
  29.           _____________________________________________________________
  30.           _c_h_a_r_a_c_t_e_r _I/_O   getwc             getc
  31.                           getwchar          getchar
  32.                           fgetwc            fgetc
  33.                           ungetwc           ungetc
  34.                           putwc             putc
  35.                           putwchar          putchar
  36.                           fputwc            fputc
  37.           _____________________________________________________________
  38.           _s_t_r_i_n_g _I/_O      getws             gets
  39.                           fgetws            fgets
  40.                           putws             puts
  41.                           fputws            fputs
  42.           _____________________________________________________________
  43.           _f_o_r_m_a_t_t_e_d _I/_O                                  printf
  44.                                                          fprintf
  45.                                                          sprintf
  46.                                                          vprintf
  47.                                                          vfprintf
  48.                                                          vsprintf
  49.                                                          scanf
  50.                                                          fscanf
  51.                                                          sscanf
  52.           _____________________________________________________________
  53.  
  54.  
  55.      The character-based input and output routines provide the ability to work
  56.      in units of characters instead of bytes.  C programs using these routines
  57.      can treat all characters from any of the four EUC code sets as  the  same
  58.      size by using the _wwww_cccc_hhhh_aaaa_rrrr______tttt representation.
  59.  
  60.      _gggg_eeee_tttt_wwww_cccc returns a value of type  _wwww_cccc_hhhh_aaaa_rrrr______tttt,  which  corresponds  to  the  EUC
  61.      representation of a character read from the input stream.  _gggg_eeee_tttt_wwww_cccc uses the
  62.      _cccc_ssss_wwww_iiii_dddd_tttt_hhhh parameter in the _c_h_a_r_a_c_t_e_r _c_l_a_s_s _t_a_b_l_e to determine the width  of
  63.      the character in its EUC form.
  64.  
  65.  
  66.  
  67.  
  68.                                                                         PPPPaaaaggggeeee 1111
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. wwwwiiiiddddeeeecccc((((3333SSSS))))                                                            wwwwiiiiddddeeeecccc((((3333SSSS))))
  76.  
  77.  
  78.  
  79.      _pppp_uuuu_tttt_wwww_cccc transforms a _wwww_cccc_hhhh_aaaa_rrrr______tttt character into EUC, and writes it to the named
  80.      output  stream.   _pppp_uuuu_tttt_wwww_cccc  also uses the _cccc_ssss_wwww_iiii_dddd_tttt_hhhh parameter to determine the
  81.      widths of characters in EUC.
  82.  
  83.      The macros _gggg_eeee_tttt_wwww_cccc_hhhh_aaaa_rrrr and _pppp_uuuu_tttt_wwww_cccc_hhhh_aaaa_rrrr; the functions  _ffff_gggg_eeee_tttt_wwww_cccc,  _ffff_pppp_uuuu_tttt_wwww_cccc,  _gggg_eeee_tttt_wwww_ssss,
  84.      _ffff_gggg_eeee_tttt_wwww_ssss,  _pppp_uuuu_tttt_wwww_ssss,  and _ffff_pppp_uuuu_tttt_wwww_ssss; and the format specifications _%%%%_wwww_cccc and _%%%%_wwww_ssss of
  85.      the functions _pppp_rrrr_iiii_nnnn_tttt_ffff,  _ffff_pppp_rrrr_iiii_nnnn_tttt_ffff,  _ssss_pppp_rrrr_iiii_nnnn_tttt_ffff,  _vvvv_pppp_rrrr_iiii_nnnn_tttt_ffff,  _vvvv_ffff_pppp_rrrr_iiii_nnnn_tttt_ffff,  _vvvv_ssss_pppp_rrrr_iiii_nnnn_tttt_ffff,
  86.      _ssss_cccc_aaaa_nnnn_ffff,  _ffff_ssss_cccc_aaaa_nnnn_ffff,  and  _ssss_ssss_cccc_aaaa_nnnn_ffff  act as if they had made successive calls to
  87.      either _gggg_eeee_tttt_wwww_cccc or _pppp_uuuu_tttt_wwww_cccc.
  88.  
  89.      The  character-based  routines  use  the  existing  byte-based   routines
  90.      internally, so the buffering scheme is the same.
  91.  
  92.      Any program that uses these routines must include  the  following  header
  93.      files:
  94.  
  95.            _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>>
  96.            _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_wwww_iiii_dddd_eeee_cccc_...._hhhh_>>>>
  97.  
  98.  
  99. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  100.      _oooo_pppp_eeee_nnnn(2), _cccc_llll_oooo_ssss_eeee(2), _llll_ssss_eeee_eeee_kkkk(2), _pppp_iiii_pppp_eeee(2), _rrrr_eeee_aaaa_dddd(2), _wwww_rrrr_iiii_tttt_eeee(2), _cccc_tttt_eeee_rrrr_mmmm_iiii_dddd(3S),
  101.      _cccc_uuuu_ssss_eeee_rrrr_iiii_dddd(3S), _ffff_cccc_llll_oooo_ssss_eeee(3S), _ffff_eeee_rrrr_rrrr_oooo_rrrr(3S), _ffff_oooo_pppp_eeee_nnnn(3S), _ffff_rrrr_eeee_aaaa_dddd(3S), _ffff_ssss_eeee_eeee_kkkk(3S),
  102.      _pppp_oooo_pppp_eeee_nnnn(3S), _pppp_rrrr_iiii_nnnn_tttt_ffff(3S), _ssss_cccc_aaaa_nnnn_ffff(3S), _ssss_eeee_tttt_bbbb_uuuu_ffff(3S), _ssss_tttt_dddd_iiii_oooo(3S), _ssss_yyyy_ssss_tttt_eeee_mmmm(3S),
  103.      _tttt_mmmm_pppp_ffff_iiii_llll_eeee(3S), _tttt_mmmm_pppp_nnnn_aaaa_mmmm(3S), _gggg_eeee_tttt_wwww_cccc(3S), _gggg_eeee_tttt_wwww_ssss(3S), _pppp_uuuu_tttt_wwww_cccc(3S), _pppp_uuuu_tttt_wwww_ssss(3S),
  104.      _uuuu_nnnn_gggg_eeee_tttt_wwww_cccc(3S), _wwww_cccc_ssss_tttt_rrrr_iiii_nnnn_gggg(3S).
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.                                                                         PPPPaaaaggggeeee 2222
  135.  
  136.  
  137.  
  138.